package cn.dengfanxin.gae.test.keyword;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;


@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Keyword{
	
	//FIXME will change to suitable time solution here two.
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Long id;
	@Persistent
	private String time;
//	private String updateTime;
	@Persistent
	private String keyword;
	@Persistent
	private String tag;
	@Persistent
	private String level;
	
	public Keyword(){
		time = "default";
		keyword = "default";
		tag = "default";
		level = "default";
	}

	public Keyword(String tm, String kw, String tg, String lv) {
		time = tm;
		keyword = kw;
		tag = tg;
		level = lv;
	}

	public Long getId() {
		return id;
	}
	
	public String getTime() {
		return time;
	}
	public void setTime(String time) {
		this.time = time;
	}
	public String getKeyword() {
		return keyword;
	}
	public void setKeyword(String keyword) {
		this.keyword = keyword;
	}
	public String getTag() {
		return tag;
	}
	public void setTag(String tag) {
		this.tag = tag;
	}
	public String getLevel() {
		return level;
	}
	public void setLevel(String level) {
		this.level = level;
	}
	public String toString(){
		return "Keyword[Time : " + time
					+ "Keyword : " + keyword
					+ "Tag : " + tag
					+ "Level : " + level
					+ "]";
	}
}
